package com.yxym.exception_;

public class Exception01  {
    public static void main(String[] args) throws Exception{//默认会有一个抛出异常
        int num1 = 10;
        int num2 = 0;
        try {
            int res = num1/num2;
            //可能出现的代码运行出错，进行try  catch包装
        } catch (Exception e) {
            e.printStackTrace();
            //System.out.println("出现异常的原因...");
        }finally {
            System.out.println("继续执行...");
        }

    }
}
